<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>注册 | 咕噜橙的博客</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
</head>

<body style="background-color: #f1f1f1; padding-bottom: 0">


<div class="container" style="margin-top: 60px">

    <div class="row" style="margin-top: 100px">
        <div class="col-md-6 col-md-offset-3">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title"><span class="glyphicon glyphicon-console"></span> Login</h3>
                </div>
                <div class="panel-body">
                    <form name="registerForm" th:action="@{/register}" method="post">
                        <div class="form-group" style="margin-top: 30px">
                            <div class="input-group col-md-6 col-md-offset-3">
                                <div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div>
                                <input name="username" id="add_phone" type="text" class="form-control"  placeholder="手机号码" onclick="myValidateUsername()">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="input-group col-md-6 col-md-offset-3">
                                <input type="number" id="code" class="form-control" name="code" style="width: 130px" value="" placeholder="请输入验证码">
                                <input type="button" id="addSendCode" class="btn btn-primary btn-block" value="获取验证码" style="width: 118px;float: right" onClick="sendAddmes()">
                            </div>
                        </div>
                        <div class="form-group ">
                            <div class="input-group col-md-6 col-md-offset-3">
                                <div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
                                <input name="password" id="password" type="password" class="form-control"  placeholder="密码" onclick="myValidatePassword()">
                            </div>
                        </div>
                        <div class="form-group ">
                            <div class="input-group col-md-6 col-md-offset-3">
                                <div class="input-group-addon"><span class="glyphicon glyphicon-pencil"></span></div>
                                <input name="nickname" id="nickname" type="text" class="form-control"  placeholder="昵称" onclick="myValidateNickname()">
                            </div>
                        </div>
                        <br>
                        <div>
                            <p id="someMeg" style="text-align: center" class="text-danger"></p>
                        </div>

                        <div class="form-group">
                            <div class="input-group col-md-6 col-md-offset-3 col-xs-12 ">
                                <button id="reg" type="submit" class="btn btn-primary btn-block">注册</button>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="input-group col-md-6 col-md-offset-3" style="text-align: center">
                                <a href="/login">返回登录页面</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

</div>
<script src="js/register.js"></script>
</body>

</html>
